package com.aaa.servlet;

import com.aaa.tomcat.MyWebServlet;
import com.aaa.tomcat.RequestAAA;
import com.aaa.tomcat.ResponseAAA;
import com.aaa.tomcat.ServletAAA;

import java.io.IOException;

/**
 * @author ：Teacher陈
 * @date ：Created in 2021/1/20 16:54
 * @description：注解的servlet
 * @modified By：
 * @version: 1
 */
@MyWebServlet(urlPatterns = "/bbb")
public class Ann2Servlet extends ServletAAA {

    @Override
    public void doGet(RequestAAA req, ResponseAAA resp) {
        this.doPost(req,resp);
    }
    @Override
    public void doPost(RequestAAA req, ResponseAAA resp) {
        System.out.println("Ann2Servlet  is  called");
        try {
            System.out.println("response is running ");
            resp.write(" I miss your sister ");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
